﻿@{
    Layout = null;
}
@using P2PWeb;
@using P2PWeb.Common;
@using P2PWeb.Controllers;

@foreach (Order order in Model.Orders)
{
    <div class="tab_box">
        <div class="w500_ie6 lineRight fl png">
            <table cellspacing="0" cellpadding="0" class="table0 mt10">
                <tbody>
                    <tr>
                        <td class="w133" rowspan="4">
                            <div class="tab_box_headBg png">
                                @if (order.Mortgage == "项目债权")
                                {
                                   <a target="_blank" href="/Lenders/Project?id=@order.Id">
                                    <span class="@(order.IsJvb ? "iconJing" : "")"></span>
                                     <img src="~/Images/project.png" title="借款人：@order.LoanPerson" alt="借款人：@order.LoanPerson" />
                                  </a>
                                }
                                else
                                {
                                  <a target="_blank" href="/Lenders/LendrsDetail?id=@order.Id">
                                    <span class="@(order.IsJvb ? "iconJing" : "")"></span>
                                    @if (order.Mortgage == "房产")
                                    {
                                      <img src="~/Images/house.png" title="借款人：@order.LoanPerson" alt="借款人：@order.LoanPerson"/>
                                    }
                                    else if (order.Mortgage == "汽车")
                                    {
                                    <img src="~/Images/car.png" title="借款人：@order.LoanPerson" alt="借款人：@order.LoanPerson" />
                                    }
                                    else
                                    {
                                     <img src="~/Images/credit.png" title="借款人：@order.LoanPerson" alt="借款人：@order.LoanPerson" />
                                    }
                                </a>
                                }
                            </div>
                        </td>
                        <td class="vt lh30">
                            <table cellspacing="0" cellpadding="0" class="mt10">
                                <tr>
                                    <td colspan="2">
                                        <a target="_self" href="/Lenders/LendrsDetail?id=@order.Id" class="@(order.IsJvb ? "iconJyb" : "")">
                                            <h3 class="fl colblue1 f12 fb" title="@order.Title" style="cursor: pointer;">&nbsp;&nbsp;@order.Title</h3>
                                            <span class="tab_box_aIcon fl"></span>
                                        </a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="liIcon w135">借款金额:<strong class="liIcon_ell56 colred ml5 vv">@order.Money</strong><span class="col666">元</span></td>
                                    <td class="liIcon">借款人:<span class="liIcon_ell56 col666 ml5 vv" title="@order.LoanPerson">@order.LoanPerson</span></td>

                                </tr>
                                <tr>
                                    <td class="liIcon w135">已投标金额:<strong class="liIcon_ell52_ie6 colred ml5 vv">@order.RealAmount</strong><span class="col666">元</span></td>
                                    <td class="liIcon">投标人数:<strong class="liIcon_ell52 colred ml5 vv">@order.NumberOfbids</strong></td>

                                </tr>
                                <tr>
                                    <td class="liIcon w135" colspan="2">借款期限:@order.TimeSpan</td>


                                </tr>
                            </table>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="fl clearfix">
            <div class="ml25 mt19">
                <div class="loadingNum fl mt19 mr7">
                    <span class="loadingNum_text">投标完成:@order.FinishRate.CustomFormat("P")</span>
                    <div style="width: @order.FinishRate.CustomFormat("P");" class="loadingNum_bar"></div>
                </div>
                <div class="lwl1_askIconBox">
                    年利率：<strong>@order.AnnualInterest.CustomFormat("P")</strong>
                </div>
            </div>
            @{
                                if (order.Status == 3)
                                {
                <div class="fl mt18 ml25_ie6">
                    <div>
                        投标金额：
                        <input id="orderAmt75563" type="text" class="tab_content_input w52 mr5" value="10000" name="orderAmt75563" maxlength="6" onkeyup="checkData(this,18,10.5,75563)">
                        <span class="col666 mr30_ie6">元</span> <span id="planAmtRate75563" class="planAmtRate"></span>
                    </div>
                    <div class="mt9">
                        剩余时间<strong class="col666 fn">@order.DueDate.Days 天 @order.DueDate.Hours 小时 </strong>
                    </div>
                </div>
                
                <a class="tsa_btn tsa_btn_tender fontClear fr mt22 mr19_ie6 dialog_tender_button" href="/Lenders/LendrsDetail?id=@order.Id">立即投标</a>
                                }                   
            }

        </div>
    </div>
}
<div id="navDiv" class="loan_page">
    <script>
        $(document).ready(function () {
            MakerNavs('myborrows','index',@Model.Page.CurrentPageIndex,@Model.Page.TotialPaqgerCount,@Model.Page.Items.Count,@Model.Page.TotialItemsCount,'navDiv','borrowsContainer');
        });
    </script>
</div>
